From 0987e770abcd7be4bbf8b79946a004c61eb66621 Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Sat, 11 Jan 2020 00:15:24 +0100 Subject: [PATCH] python: Recognize python-X.Y-embed flavor introduced with Python 3.8 in Debian The non-"embed" .pc file does not include linker instructions. See Debian bug #948017 Gbp-Pq: Name 0017-python-Recognize-python-X.Y-embed-flavor-introduced-.patch --- m4/guestfs-python.m4 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4 index 7d4c991b..d4fc710e 100644 --- a/m4/guestfs-python.m4 +++ b/m4/guestfs-python.m4 @@ -33,20 +33,27 @@ AS_IF([test "x$enable_python" != "xno"],[ PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"` PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR" AC_MSG_RESULT([$PYTHON_VERSION]) - # Debian: python-2.7.pc, python-3.2.pc - PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[ + # Debian: python-2.7.pc, python-3.2.pc. But also: python-3.8-embed.pc + PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"-embed],[ AC_SUBST([PYTHON_CFLAGS]) AC_SUBST([PYTHON_LIBS]) AC_SUBST([PYTHON_VERSION]) AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time]) ],[ - PKG_CHECK_MODULES([PYTHON], [python],[ + PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[ AC_SUBST([PYTHON_CFLAGS]) AC_SUBST([PYTHON_LIBS]) AC_SUBST([PYTHON_VERSION]) AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time]) ],[ - AC_MSG_WARN([python $PYTHON_VERSION not found]) + PKG_CHECK_MODULES([PYTHON], [python],[ + AC_SUBST([PYTHON_CFLAGS]) + AC_SUBST([PYTHON_LIBS]) + AC_SUBST([PYTHON_VERSION]) + AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time]) + ],[ + AC_MSG_WARN([python $PYTHON_VERSION not found]) + ]) ]) ]) AC_MSG_CHECKING([Python prefix]) -- 2.30.2